package com.tp.web.Service;

import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.tp.common.po.User;
import com.tp.web.Mapper.UserMapper;
@Service
public class UserServiceImpl implements UserService {
	@Autowired
	private UserMapper userMapper;
	
	@Override
	public User findUserById(Long id) {
		System.out.println(id);
		//User user = userMapper.findUserById(id);
		User userTmp = new User();
		userTmp.setId(id);
		userTmp.setBirthday(new Date());
		userTmp.setCity(null);
		userTmp.setGender(null);
		userTmp.setDescribe(null);
		userTmp.setPhone(null);
		userTmp.setHobby(null);
		userTmp.setQqNumber(null);
		userTmp.setUsername(null);
		userTmp.setPassword(null);
		userTmp.setCreated(null);
		userTmp.setUpdated(null);
		User user=userMapper.selectByPrimaryKey(userTmp);
		System.out.println(user.getId());
		return user;
	}

}
